package edu.Test;

public class test6 {
    public static void main(String[] args) {
        String name = "郭意诚";
        String age = "20岁";
        String s = concat(name, age);
        System.out.println(s);

        //字符串长度：
        int length = s.length();
        System.out.println("长度："+length);
    }
    //将指定字符串连接到此字符串的末尾
    public static String concat(String origin,String suf){
        //在指定字符串尾部拼接数据
        String msg = origin.concat(suf);
        return msg;
    }
}
